GUI Help > Dialogs > openDialog

openDialog
str fileName=openDialog(str caption, str fileTypes)

Description:
Displays a standard open-file dialog. This allows the user to select a file to open. This is usually used for opening and saving documents in a Level Editor for example.

Return Value:
The filename and path of the file which the user selected.

Parameters:
caption The caption which appears in the title bar of the dialog, eg "Open Editor File"
fileTypes String specifying the types of files which the user can view. The string looks like this :
Description of FileType|Extension|Description of FileType|Extension
Using a pipe character | (chr$(127)) to seperate each part.

For example:
file=openDialog("Open Text File","Text Files (*.txt)|*.txt|All Files (*.*)|*.*")
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)